<html>
  <head>
    <title>Carabiner Examples</title>
  </head>
  <body>
    <h2>Carabiner Examples</h2>

    <h4><a href="org/carabiner/examples/TestMyGuiControl.java">TestMyGuiControl.java</a></h4>
    A very low level example of how to use carabiner from inside a JUnit test. In this example, please note:
    <ul>
      <li>The use of a stub object (StubDataModel) to act as a fixture for the harness.</li>
      <li>That the <a href="../doc/org/carabiner/state/StateFactory.html">StateFactory</a> in the <code>testBlessed()</code> method uses the <b>class</b> of the control, not the instance.</li>
      <li>The <code>main()</code> method that runs the harness re-uses the test's <code>setUp()</code> method to intialize,
        ensuring that the inital state for the unit tests and test harness is the same.</li>
    </ul>

    <h4><a href="org/carabiner/examples/Test2MyGuiControl.java">Test2MyGuiControl.java</a></h4>
    A higher level example of how to use carabiner in a JUnit test. In this example, please note:
    <ul>
      <li>The use of a mock object to act as a fixture for the harness.</li>
      <li>The test extends <a href="../doc/org/carabiner/CarabinerTestCase.html">CarabinerTestCase</a>.</li>
      <li>The main method that runs the harness re-uses the test's setUp() method.</li>
    </ul>

    <h4><a href="org/carabiner/examples/TestMyWindow.java">TestMyWindow.java</a></h4>
    An example of how to test a Frame or Window using Carabiner. In this example, please note:
    <ul>
      <li>Even though the window is show completely seperated from the test harness, all the same functions are available.</li>
      <li>Closing the window does not close the harness, which allows you to test the behavior of the close operation.</li>
    </ul>

    <h2>Running the Examples</h2>
    <p>To run the examples, you must have <a href="http://ant.apache.org/">Ant 1.6</a> (or later). To make things
    easier, considering adding the ${ANT_HOME}/bin directory to your path. Then, from the top level carabiner directory run:</p>
    <blockquote>
      <code>ant example[n]</code>
    </blockquote>
    <p>where [n] is the number of the example (1, 2, 3, etc...)</p>

    </body>
</html>
